home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / netprog.zip / NETPROG.TAR / lib / spipe.c < prev    next >
C/C++ Source or Header  |  1989-12-17  |  280b  |  14 lines

  1. /*
  2.  * Create an unnamed stream pipe.
  3.  */
  4.  
  5. #include    <sys/types.h>
  6. #include    <sys/socket.h>
  7.  
  8. int            /* returns 0 if all OK, -1 if error (with errno set) */
  9. s_pipe(fd)
  10. int    fd[2];        /* two file descriptors returned through here */
  11. {
  12.     return( socketpair(AF_UNIX, SOCK_STREAM, 0, fd) );
  13. }
  14.